﻿using System.Runtime.Serialization;
using Newtonsoft.Json;

namespace CuteRibs.WowArmory.Models
{
	#region BattlegroupResource
	/// <summary>
	/// {
	///		"battlegroups": []
	///	}
	/// </summary>
	[JsonObject]
	public class BattlegroupResource : BNObjectBase
	{
		[JsonProperty("battlegroups")]
		public Battlegoup[] Battlegroups { get; set; }
	}
	#endregion

	#region Battlegoup
	/// <summary>
	/// {
	///		"charName": "Battle Group 11",
	///		"slug": "battle-group-11"
	///	}
	/// </summary>
	[JsonObject]
	public class Battlegoup
	{
		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("slug")]
		public string Slug { get; set; }
	}
	#endregion

	#region RaceResource
	/// <summary>
	/// {
	///		"races": []
	///	}
	/// </summary>
	[JsonObject]
	public class RaceResource : BNObjectBase
	{
		[JsonProperty("races")]
		public CharacterRace[] Races { get; set; }
	}
	#endregion

	#region CharacterRace
	/// <summary>
	/// {
	///		"id": 11,
	///		"mask": 1024,
	///		"side": "alliance",
	///		"charName": "德萊尼"
	///	}
	/// </summary>
	[JsonObject]
	public class CharacterRace
	{
		[JsonProperty("id")]
		public int Id { get; set; }

		[JsonProperty("mask")]
		public int Mask { get; set; }

		[JsonProperty("side")]
		public string Side { get; set; }

		[JsonProperty("name")]
		public string Name { get; set; }
	}
	#endregion

	#region ClassResource
	/// <summary>
	/// {
	///		"classes": []
	///	}
	/// </summary>
	[JsonObject]
	public class ClassResource : BNObjectBase
	{
		[JsonProperty("classes")]
		public CharacterClass[] Classes { get; set; }
	}
	#endregion

	#region CharacterClass
	/// <summary>
	/// {
	///		"id": 3,
	///		"mask": 4,
	///		"powerType": "focus",
	///		"charName": "Hunter"
	///	}
	/// </summary>
	[JsonObject]
	public class CharacterClass
	{
		[JsonProperty("id")]
		public int Id { get; set; }

		[JsonProperty("mask")]
		public int Mask { get; set; }

		[JsonProperty("powerType")]
		public string PowerType { get; set; }

		[JsonProperty("name")]
		public string Name { get; set; }
	}
	#endregion

	#region GuildRewardResources
	/// <summary>
	/// {
	///		"rewards": []
	///	}
	/// </summary>
	[JsonObject]
	public class GuildRewardResources
	{
		[JsonProperty("rewards")]
		public GuildReward[] Rewards { get; set; }
	}
	#endregion

	#region GuildReward
	/// <summary>
	/// {
	///		"minGuildLevel": 0,
	///		"minGuildRepLevel": 6,
	///		"races": [],
	///		"achievement": {},
	///		"item": {}
	///	}
	/// </summary>
	[JsonObject]
	public class GuildReward
	{
		[JsonProperty("minGuildLevel")]
		public int MinGuildLevel { get; set; }

		[JsonProperty("minGuildRepLevel")]
		public int MinGuildRepLevel { get; set; }

		[JsonProperty("races")]
		public int[] Races { get; set; }

		[JsonProperty("achievement")]
		public Achievement Achievement { get; set; }

		[JsonProperty("item")]
		public Item Item { get; set; }
	}
	#endregion

	#region GuildPerkResources
	/// <summary>
	/// {
	///		"perks": []
	///	}
	/// </summary>
	[JsonObject]
	public class GuildPerkResources
	{
		[JsonProperty("perks")]
		public GuildPerk[] Rewards { get; set; }
	}
	#endregion

	#region GuildPerk
	/// <summary>
	/// {
	///		"guildLevel": 2,
	///		"spell": {}
	///	}
	/// </summary>
	[JsonObject]
	public class GuildPerk
	{
		[JsonProperty("guildLevel")]
		public int GuildLevel { get; set; }

		[JsonProperty("spell")]
		public Spell Spell { get; set; }
	}
	#endregion

	#region ItemClassResource
	/// <summary>
	/// {
	///		"classes": []
	///	}
	/// </summary>
	[JsonObject]
	public class ItemClassResource
	{
		[JsonProperty("classes")]
		public ItemClass[] Classes { get; set; }
	}
	#endregion

	#region ItemClass
	/// <summary>
	/// {
	///		"class": 1,
	///		"charName": "Container",
	///		"subclasses": []
	///	}
	/// </summary>
	[JsonObject]
	public class ItemClass
	{
		[JsonProperty("class")]
		public int Class { get; set; }

		[JsonProperty("name")]
		public string Name { get; set; }

		[JsonProperty("subclasses")]
		public ItemSubclass[] Subclasses { get; set; }
	}
	#endregion

	#region ItemSubclass
	/// <summary>
	/// {
	///		"subclass": 4,
	///		"charName": "Engineering Bag"
	///	}
	/// </summary>
	[JsonObject]
	public class ItemSubclass
	{
		[JsonProperty("subclass")]
		public int Subclass { get; set; }

		[JsonProperty("name")]
		public string Name { get; set; }
	}
	#endregion
}
